package com.zengshuai.miniprogrambackend.Mapper;


import com.zengshuai.miniprogrambackend.Entity.Order;
import com.zengshuai.miniprogrambackend.Entity.ServiceSwiper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderMapper {

    //获取订单列表
    List<Order> getOrderlistbystatus(@Param("status") int status);

    List<Order> getorderlistbystatusAndemployeeid(@Param("status") int status,@Param("employeeid") int employeeid);

    List<Order> getAllOrderlist();

    void saveOrder(@Param("booktime") String booktime, @Param("serviceid") String serviceid, @Param("price") String price,
                   @Param("servicename") String servicename, @Param("address") String address, @Param("openid") String openid,
                   @Param("telnumber") String telnumber, @Param("orderid") String orderid, @Param("ordertime") String ordertime);

    void updateStatusTo5(int id);

    void updateStatusTo4(int id);

    void updateStatusTo1(int id);

    void deleteorder(int id);

    //员工接单
    void updateStatusTo2(int id);

    //员工已上门
    void updateStatusTo6(int id);

    //员工完成收款
    void updateStatusTo3(int id);


    void receiveorder(int id, String employeeid);


    List<Order> getorderlist(Integer page, Integer pagesize);

    Integer getorderlistlength();

    List<Order> cxorder(Integer page, Integer pagesize, String orderid);

    List<ServiceSwiper> getswiperlist(Integer page, Integer pagesize);
}
